<!DOCTYPE html>
<html>
	<head>
		<link rel="stylesheet" href="../../../codebase/webix.css" type="text/css" media="screen" charset="utf-8">
		<script src="../../../codebase/webix.js" type="text/javascript" charset="utf-8"></script>
		<style>
			#areaA, #areaB{
				margin: 30px;
			}
			html, body{height:100%}
		</style>
		<title>Date Picker ('datepicker')</title>
	</head>
	<body>

		<div id="areaA"></div>
		<div id="areaB"></div>

		<script type="text/javascript" charset="utf-8">
		webix.ui({ 
			container:"areaA", 
			view:"form", scroll:false, elements:[
				{ view:"text", label:"Front label", name:"label", value:"Some text", width:300},

				{ view:"datepicker", label:"Start date", name:"start", stringResult:true },
				{ view:"datepicker", label:"End date", name:"end", stringResult:true },

				{ view:"button", type:"form", value:"Submit data", click:function(){
					webix.message("<pre>"+JSON.stringify(this.getParentView().getValues(),0,1)+"</pre>");
				}}
			]
		});

		webix.ui({ 
			container:"areaB", 
			view:"form", scroll:false, id:"myform-2", elements:[
				{ view:"text", label:"Front label", name:"label", value:"Some text", width:300},

				{ view:"datepicker", label:"Start date", name:"start", stringResult:true, format:"%d  %M %Y" },
				{ view:"datepicker", timepicker:true, label:"End date", name:"end", stringResult:true, format:"%d %M %Y at %H:%i" },

				{ view:"button", type:"form", value:"Submit data", click:function(){
					webix.message("<pre>"+JSON.stringify(this.getParentView().getValues(),0,1)+"</pre>");
				}}
			]
		});

		$$('myform-2').setValues({
			start:"2012-02-01",
			end:new Date(2012,1,3, 14, 20)
		});



		</script>
	</body>
</html>